/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (CSkybox - skybox header)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson	<B00137077@studentmail.uws.ac.uk>
*				John Gray			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop			<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/
#ifndef CSKYBOX_H
#define CSKYBOX_H

#include <GL/glut.h>
#include <windows.h>
#include <windowsx.h>
#include "CCamera.h"

# define GL_NORMAL_MAP_EXT                   0x8511
# define GL_REFLECTION_MAP_EXT               0x8512
# define GL_TEXTURE_CUBE_MAP_EXT             0x8513
# define GL_TEXTURE_BINDING_CUBE_MAP_EXT     0x8514
# define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT  0x8515
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT  0x8516
# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT  0x8517
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT  0x8518
# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT  0x8519
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT  0x851A
# define GL_PROXY_TEXTURE_CUBE_MAP_EXT       0x851B
# define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT    0x851C
# define GL_CLAMP_TO_EDGE					 0x812F
# define GL_TEXTURE_WRAP_R					 0x8072

class CSkybox
{
public:
	GLuint cubeMap, decalTexture;
	GLuint cubeFaces[6];
	void render();
	int loadGLTextures();
	bool loadFace(GLenum target, char *filename);
	bool LoadBitmap(LPTSTR szFileName, GLuint &texid, GLuint target);
};

#endif // CSKYBOX_H